package com.senseuni.da.http;

public class BaseResponse<T> {

    public static final String CODE_SUCCESS = "200"; //处理成功


    private String msg;
    private String code;
    private T data;

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getCodeAndMessage() {
        return getCode() + "&" + getMsg();
    }

    public boolean isSuccess() {
        //修改手机号后第一次登陆会是201
        return "200".equals(code);
    }

}
